package app.util;

import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.webapp.WebAppContext;

import app.handler.HelloHandler;

public class SimpleServerStart {
	
	public static void main(String[] args) throws Exception {
		/*try{
			Server server = new Server(8080);
			WebAppContext context = new WebAppContext();
			context.setDescriptor("./webapp/WEB-INF/web.xml");
			context.setResourceBase("./webapp");
			context.setContextPath("/");
			context.setParentLoaderPriority(true);
			server.setHandler(context);
			server.start();
			server.join();
		} catch (Exception e) {
			e.printStackTrace();
		}*/
		
		Server server = new Server(8080);
		server.setHandler(new HelloHandler());
		
		server.start();
		server.dumpStdErr();
		server.join();
	}
}
